package com.zxy.controller;

import com.zxy.feignclient.ProductClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Zxy
 * @description: 测试调product使用sentinel实现服务熔断
 * @date: 2021-07-23 14:48
 */
@RestController
public class DemoController {


    @Autowired
    @Qualifier("productClientImpl")
    private ProductClient productClient;

    @GetMapping("/invokeProduct")
    public String invokeProduct(){
        return productClient.product(21);
    }
}
